<template>
  <div class="search">
    <f-form ref="form" :action="api.company.setAuditState" :form-key="this.formItem.companyId">
      <f-form-item label="法人姓名" name="legalPerson" :value="formItem.legalPerson" :disabled="true"/>
      <f-form-item label="联系方式" name="accountName" :required="true"  :value="formItem.linkTel" :disabled="true"/>
      <f-form-item label="企业代码" name="businessLicNo" :value="formItem.businessLicNo" :disabled="true"/>
      <f-form-item label="营业执照" name="businessLic" type="upload" :value="formItem.businessLic" :file-max="1"/>
      <f-form-item label="法人身份证(正)" name="backIdCard" type="upload" :value="formItem.backIdCard" :disabled="true"/>
      <f-form-item label="法人身份证(反)" name="frontIdCard" type="upload" :value="formItem.frontIdCard" :disabled="true"/>
    </f-form>
  </div>
</template>

<script>

  export default {
    name: 'CompanyFaren',
    props: {},
    data() {
      return {
        saving: false,
        auditState: 2,
        modalVisible: false,
        formItem: this.getFormItem()
      }
    },
    methods: {
      getFormItem() {
        return {}
      },
      setData(data) {
        this.$refs.form.resetFields()
        if (data && data.companyId) {
          this.http.get(this, {
            url: this.api.company.get,
            params: {
              companyId: data.companyId
            },
            success: function(me, data) {
              me.loaded = true
              me.formItem = data
            }
          })
          this.isAdd = false
        } else {
          this.formItem = this.getFormItem()
          this.loaded = true
        }
      },
      handleSubmit() {

      }
    },
    created() {

    },
    components: {}
  }
</script>

<style scoped lang="less" rel="stylesheet/less">

</style>
